/**
 * 工单BOM详情 api 封装
 *
 * @Author:    lmabbe
 * @Date:      2025-07-03 17:39:42
 * @Copyright  lmabbe
 */
import { getRequest, postRequest } from '/@/lib/axios';

export const workOrderBomDetailApi = {
  /**
   * 分页查询  @author  lmabbe
   */
  queryPage: (param) => {
    return postRequest('/workOrderBomDetail/queryPage', param);
  },

  /**
   * 增加  @author  lmabbe
   */
  add: (param) => {
    return postRequest('/workOrderBomDetail/add', param);
  },

  /**
   * 修改  @author  lmabbe
   */
  update: (param) => {
    return postRequest('/workOrderBomDetail/update', param);
  },

  /**
   * 删除  @author  lmabbe
   */
  delete: (id) => {
    return getRequest(`/workOrderBomDetail/delete/${id}`);
  },

  /**
   * 批量删除  @author  lmabbe
   */
  syncBom: (id) => {
    return getRequest(`/workOrderBomDetail/syncBom/${id}`);
  },

  reCalcDosage: (id) => {
    return getRequest(`/workOrderBomDetail/reCalcDosage/${id}`);
  },
};
